package edu.calvin.djs32.cs214.interpreters.calculator.primitives;

import edu.calvin.cs214.hobbes2008.HobbesTIR;
import edu.calvin.cs214.hobbes2008.IntegerTIR;
import edu.calvin.djs32.cs214.interpreters.calculator.Primitive;

public class AddPrimitive implements Primitive{

	public HobbesTIR apply(HobbesTIR... tir) {
		IntegerTIR arg0 = (IntegerTIR) tir[0];
		IntegerTIR arg1 = (IntegerTIR) tir[1];
		int finalInt = arg0.getInt() + arg1.getInt();
		return new IntegerTIR(finalInt);
	}


}
